//
//  CasesViewController.m
//  KurtulusLaw
//
//  Created by phuc phuc on 12/1/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "CasesViewController.h"
#import "CasesCell.h"
#import "Constant.h"
#import "KCaseDAO.h"
#import "KCaseCellFactory.h"
@interface CasesViewController()
{
	UITapGestureRecognizer *oneTap;
}

@end
@implementation CasesViewController



- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidUnload
{
    [super viewDidUnload];
 
}
- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad

{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.    
    [self.titleView setText:NSLocalizedString(@"Cases", nil)];
	
       
}
- (void)initializeFactory {
	_searchFileDAO = [[KCaseDAO alloc] init];
	
	_searchCommandDTO = [[KCaseCommandDTO alloc] initWithSessionID:[CCommon shareSessionID] ];
	_cellFactory = [[KCaseCellFactory alloc] init];
}

- (void)viewWillAppear:(BOOL)animated {
	[super viewWillAppear:animated];
	
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    
	UIView *view = [super tableView:tableView viewForHeaderInSection:section];
	
    // Create label with section title
    UILabel *label = [[UILabel alloc] init] ;
    label.frame = CGRectMake(40, 0, 160, 23);
    label.textColor = [UIColor whiteColor];
    label.font = [UIFont boldSystemFontOfSize:15.0f];
    label.text = NSLocalizedString(@"Case Name", nil);
    label.backgroundColor = [UIColor clearColor];
    [view addSubview:label];
	
	UILabel *label1 = [[UILabel alloc] init] ;
    label1.frame = CGRectMake(210, 0, 130, 23);
    label1.textColor = [UIColor whiteColor];
    label1.font = [UIFont boldSystemFontOfSize:15.0f];
    label1.text = NSLocalizedString(@"Document", nil);
    label1.backgroundColor = [UIColor clearColor];
	[view addSubview:label1];
    
    return view;
    
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

#pragma mark - UITableViewDataSource,UITableViewDelegate





@end
